A Compositional Method for Verifying Software Transactional Memory Implementations
نویسنده
چکیده
We present a compositional method for verifying software transactional memory (STM) implementations and its application to the Bartok STM. The method consists of two parts. The first is a generic, manual proof of serializability at the algorithm level for lazy-invalidate, write-in-place STM’s. The proof relies on three properties of program executions that the STM must ensure. The second part consists of proving that the Bartok STM implementation guarantees these properties and thus refines the algorithmlevel description. We present a novel technique for expressing the properties required of the STM implementation as assertions in sequential programs that model certain interference scenarios. This is a key benefit, as it allows these properties to be checked using sequential program verification tools. Using our method, the Spec# language and the Boogie verification tool, we were able to detect an omission in the published pseudo-code for the STM implementation and “challenge bugs” extracted from earlier versions of the STM. We were also able to prove correct the most recent version of the implementation.
منابع مشابه
Modularising Opacity Verification for Hybrid Transactional Memory
Transactional memory (TM) manages thread synchronisation to provide an illusion of atomicity for arbitrary blocks of code. There are various implementations of TM, including hardware (HTM) and software (STM). HTMs provide high performance, but are inherently limited by hardware restrictions; STMs avoid these limitations but suffer from unpredictable performance. To solve these problems, hybrid ...
متن کاملCompiling concurrency correctly : verifying software transactional memory
Concurrent programming is notoriously difficult, but with multi-core processors becoming the norm, is now a reality that every programmer must face. Concurrency has traditionally been managed using low-level mutual exclusion locks, which are error-prone and do not naturally support the compositional style of programming that is becoming indispensable for today’s large-scale software projects. A...
متن کاملSoftware Transactional Memory, OpenMP and Pthread Implementations of the Conjugate Gradients Method - A Preliminary Evaluation
This paper shows the runtime and cache-efficiency of parallel implementations of the Conjugate Gradients Method based on the three paradigms Software Transactional Memory (STM), OpenMP and Pthreads. While the two last named concepts are used to manage parallelization as well as synchronization, STM was designed to handle only the latter. In our work we disclose that an improved cache efficiency...
متن کاملOn Justifying and Verifying Relaxed Detection of Conflicts in Concurrent Programs
Transactional Memory (TM) simplifies concurrent programming by providing atomic, compositional blocks within which programmers can reason sequentially. Many transactions have an access pattern where, initially, a large portion of the shared data is read, local computations is performed, and, later, a small portion of shared data is updated. Such transactions conflict frequently and result in po...
متن کاملOn Justifying and Verifying Relaxed Detection of Conflicts in Concurrent Programs
Transactional Memory (TM) simplifies concurrent programming by providing atomic, compositional blocks within which programmers can reason sequentially. Many transactions have an access pattern where, initially, a large portion of the shared data is read, local computations is performed, and, later, a small portion of shared data is updated. Such transactions conflict frequently and result in po...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2008